﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="content_saveAdvance.aspx.cs"
    Inherits="TRPOP.CMS.Web.Admin.content_saveAdvance" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>添加内容-<%=base.m_strBaseAdminPageName%></title>
    <script src="../../js/utils.js" type="text/javascript"></script>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../js/jquery.form.js" type="text/javascript"></script>
    <script src="../js/utils.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div runat="server" visible="false" id="topIt_panel">
        <table border="0" cellspacing="3" cellpadding="0">
            <tr>
                <td>
                    置顶权重:
                </td>
                <td>
                </td>
                <td>
                    <cms:TextBox runat="server" ID="Weight" Width="65px" />
                </td>
                <td>
                    <input type="button" name="Submit"  class="button_style" value="确定" onclick="setWeigth();" />
                    <input type="button" name="Submit2" class="button_style" value="取消" onclick=" parent.close_dialog();" />
                </td>
            </tr>
            <tr align="right">
                <td colspan="4">
                </td>
            </tr>
        </table>
        <script language="javascript" type="text/javascript">
            function setWeigth() {
                var id = UrlParm.parm('id');
                if (id == "ids") {
                    id = parent.getSelectVal();
                    //alert(id);return false;
                }
                var nodeid = UrlParm.parm('nodeid');
                var topval = $("#Weight").val();
                if (isNaN(topval)) {
                    alert("只能填数字"); return false;
                }
                var returntext = $.ajax({ type: "POST", url: 'content_saveAdvance.aspx', data: 'ac=ajax_set_topvalue&nodeid=' + nodeid + '&topval=' + topval + '&id=' + id, async: false }).responseText;
                var msg = eval("msg=" + returntext);
                if (msg.result == "1") {
                    alert("置顶设置成功");
                    parent.window.location.reload(true);
                }
                else {
                    // alert(msg.msg);出错信息
                    alert("置顶设置失败");
                }
            }
        </script>
    </div>
    <div visible="false" runat="server" id="pinkIt_panel">
        <table border="0" cellspacing="3" cellpadding="0">
            <tr>
                <td>
                    精华权重:
                </td>
                <td>
                </td>
                <td>
                    <cms:TextBox runat="server" ID="EliteWeight" Width="65px" />
                </td>
                <td>
                    <input type="button" name="Submit" value="确定" class="button_style" onclick="setEliteWeight();" />
                    <input type="button" name="Submit2" value="取消" class="button_style" onclick=" parent.close_dialog();" />
                </td>
            </tr>
            <tr align="right">
                <td colspan="4">
                </td>
            </tr>
        </table>
        <script language="javascript" type="text/javascript">
            function setEliteWeight() {
                var id = UrlParm.parm('id');
                if (id == "ids") {
                    id = parent.getSelectVal();
                    //alert(id);return false;
                }
                var nodeid = UrlParm.parm('nodeid');
                var eliteval = $("#EliteWeight").val();
                if (isNaN(eliteval)) {
                    alert("只能填数字"); return false;
                }
                var returntext = $.ajax({ type: "POST", url: 'content_saveAdvance.aspx', data: 'ac=ajax_set_elitevalue&nodeid=' + nodeid + '&eliteval=' + eliteval + '&id=' + id, async: false }).responseText;
                var msg = eval("msg=" + returntext);
                if (msg.result == "1") {
                    alert("精华设置成功");
                    parent.window.location.reload(true);
                }
                else {
                    // alert(msg.msg);出错信息
                    alert("精华设置失败");
                    parent.close_dialog();
                }
            }
        </script>
    </div>
    <div id="sortIt_panel" runat="server" visible="false">
        <table border="0" cellspacing="3" cellpadding="0">
            <tr>
                <td>
                    排序权重:
                </td>
                <td>
                </td>
                <td>
                    <cms:TextBox runat="server" ID="SortWeight" Width="65px" />
                </td>
                <td>
                    <input type="button" name="Submit" value="确定" class="button_style" onclick="setSortWeight();" />
                    <input type="button" name="Submit2" value="取消" class="button_style" onclick=" parent.close_dialog();" />
                </td>
            </tr>
            <tr align="right">
                <td colspan="4">
                </td>
            </tr>
        </table>
        <script language="javascript" type="text/javascript">
            function setSortWeight() {
                var id = UrlParm.parm('id');
                if (id == "ids") {
                    id = parent.getSelectVal();
                    //alert(id);return false;
                }
                var nodeid = UrlParm.parm('nodeid');
                var sortval = $("#SortWeight").val();
                if (isNaN(sortval)) {
                    alert("只能填数字"); return false;
                }
                var returntext = $.ajax({ type: "POST", url: 'content_saveAdvance.aspx', data: 'ac=ajax_set_sortvalue&nodeid=' + nodeid + '&sortval=' + sortval + '&id=' + id, async: false }).responseText;
                var msg = eval("msg=" + returntext);
                if (msg.result == "1") {
                    alert("排序设置成功");
                    parent.window.location.reload(true);
                }
                else {
                    // alert(msg.msg);出错信息
                    alert("排序设置失败");
                    parent.close_dialog();
                }
            }
        </script>
    </div>
    </form>
</body>
</html>
